<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ include file="/page/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@ include file="/adapter/adapter-bootstrap.jsp" %>
</head>
<body>
<div class="panel panel-default">
   <div class="panel-heading">
      <h3 class="panel-title">
          请输入查询条件
      </h3>
   </div>
   <div class="panel-body">
<form class="form-horizontal" role="form">
                        <div class="form-group">
                          <label class="col-xs-1 control-label" for="ds_host">用户名</label>
                          <div class="col-xs-3">
                             <input class="input-xs form-control" id="ds_host" type="text" />
                          </div>
                          <label class="col-xs-1 control-label" for="ds_name">姓名</label>
                          <div class="col-xs-3">
                             <input class="input-xs form-control" id="ds_name" type="text"/>
                          </div>
                       </div>
                       <div class="form-group">
                          <label class="col-xs-1 control-label" for="ds_username">所在机构</label>
                          <div class="col-xs-3">
                             <input class="input-xs form-control" id="ds_username" type="text"/>
                          </div>
                          <label class="col-xs-1 control-label" for="ds_password">用户状态</label>
                          <div class="col-xs-3">
                              <select id="disabledSelect" class="input-xs form-control">
                                 <option>黑名单</option>
                                 <option>白名单</option>
                              </select>
                          </div>
                          <div class="col-xs-3">
                          	 <button type="button" class="btn btn-default btn-sm" onclick="Utils.forward('${ctx }/user/list');">查询</button>                          
                          </div>
                       </div>
                </form>
	</div>
</div>
		<c:if test="${msg!=null }"><span>${msg }</span></c:if>
		<form id="dataListForm" method="post">
			<table class="table table-bordered" style="" width="100%" cellspacing="1" cellpadding="0" border="0">
				<thead>
					<tr class="active">
						<th width="20"><input type='checkbox' onclick='Utils.toggleCheckState("ids")' /></th>
						<th>ID</th>
						<th>用户名<span><input type="hidden" name="fieldName" value="username" disabled="disabled"/> </span></th>
						<th>姓名</th>
						<th>机构代码</th>
						<th>机构名称</th>
						<th>用户状态</th>
						<th>操作选项</th>
					</tr>
				</thead>				
				<tbody>
				<c:forEach items="${page.result }" var="user">
 						<tr align="center" style="background-color: D8E5F2;">
							<td><input type='checkbox' name='ids' value='${user.id}' /></td>
							<td>${user.id}</td>
							<td>${user.username}</td>
							<td>${user.name}</td>
							<td>${user.deptCode}</td>
							<td>${user.deptName}</td>
							<td ${user.status eq 0?'class=red':''}>
							<c:forEach items="${itemList }" var="item">
							<c:if test="${item.code==user.status}">
							${item.name}  
							</c:if>
							</c:forEach> 
							</td>
							<td>
 								<c:if test="${sessionScope.hasPermission['User:view'] }">
								<a href="${ctx }/acl/user!view.action?id=${user.id}" class="pn-opt">查看</a> </c:if>
 								<c:if test="${sessionScope.hasPermission['User:update'] }">
								<a href="${ctx }/user/input?id=${user.id}&pageNo=${page.pageNo}" class="pn-opt">修改</a> </c:if>
 								<c:if test="${sessionScope.hasPermission['User:delete'] }"> 
								<a href="${ctx }/user/delete?id=${user.id}" class="pn-opt delete">删除</a>	</c:if>						
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</form>
</body>
</html>